package com.admin.education.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

@Configuration
@PropertySource(value = {"classpath:/wechatConfig.properties"},
        ignoreResourceNotFound = true,encoding = "utf-8")
@Data
public class WechatConfig {
    @Value("${grantType}")
    private String grantType;
    @Value("${appId}")
    private String appId;
    @Value("${secret}")
    private String secret;
    @Value("${mchId}")
    private String mchId;;
    @Value("${key}")
    private String key;
    @Bean
    public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
        return new PropertySourcesPlaceholderConfigurer();
    }
}

